package com.crm.jdy.common.pojo;
import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.Date;

/**   
 * @Description:(商务活动实体类)
 * 
 * @version: V1.0
 * @author: kong
 * 
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
public class ActivityInfo extends Model<ActivityInfo> {

	private static final long serialVersionUID = 1616664217787L;

	@TableId(value = "activity_id", type = IdType.ID_WORKER_STR)
	@ApiModelProperty(name = "activityId" , value = "商业活动主键id")
	private String activityId;

	@NotBlank(message = "活动名称非空")
	@ApiModelProperty(name = "activityName" , value = "活动名称")
	private String activityName;

	@ApiModelProperty(name = "activityObject" , value = "关联对象")
	private String activityObject;

	@ApiModelProperty(name = "activityCreatePerson" , value = "创建人")
	private String activityCreatePerson;

	@ApiModelProperty(name = "activityType" , value = "活动类型")
	private String activityType;


	@ApiModelProperty(name = "activityStartTime" , value = "开始时间")
	private String activityStartTime;


	@ApiModelProperty(name = "activityEndTime" , value = "截止时间")
	private String activityEndTime;

	@ApiModelProperty(name = "activityBudget" , value = "活动预算")
	private String activityBudget;

	@ApiModelProperty(name = "activityAddress" , value = "活动地址")
	private String activityAddress;

	@JsonIgnore
	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
	@ApiModelProperty(name = "createTime" , value = "创建时间")
	@TableField(fill = FieldFill.INSERT)
	private Date createTime;

	@JsonIgnore
	@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
	@ApiModelProperty(name = "updateTime" , value = "更新最新时间")
	@TableField(fill = FieldFill.INSERT_UPDATE)
	private Date updateTime;

	@ApiModelProperty(name = "activityStatus" , value = "状态")
	private String activityStatus;

	@ApiModelProperty(name = "activityReality" , value = "实际花销")
	private String activityReality;

	@JsonIgnore
	@TableLogic
	@ApiModelProperty(name = "isDelete" , value = "0正常   1删除")
	private Integer isDelete;

	@NotNull(message = "父类id不能为空")
	@ApiModelProperty(name = "parentId" , value = "父类ID")
	private String parentId;


}
